package com.cn.xiaonuo.slbfinances.slbagents.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;
@Repository
@Mapper
public interface SalesOperationsMapper extends BaseMapper<String> {
    //查询直接下级有10瓶酒以上消费的人数，timeType为空就是查询累计数，timeType=week就是查询当前周【陈】
    public List<Map<String, Object>> queryDownUserBuy(
            @Param("user_id") String user_id,
            @Param("timeType") String timeType,
            @Param("startTime") String startTime,
            @Param("endTime") String endTime
    );

    //查询他自己是否消费10瓶酒，timeType为空就是查询累计数，timeType=week就是查询当前周【陈】
    public List<Map<String, Object>> queryOwnBuy(
            @Param("user_id") String user_id,
            @Param("timeType") String timeType,
            @Param("startTime") String startTime,
            @Param("endTime") String endTime
    );
    //查询直接下级中有几个区代/市代【陈】
    public List<Map<String, Object>> queryZjSalesOperations(
            @Param("user_id") String user_id,
            @Param("agent") String agent
    );
    //查询出所有用户
    public List<Map<String, Object>> queryConditionLower(@Param("userId") String userId);

    //查询自己是否符合提成条件
    public List<Map<String, Object>> queryConditionOwn(@Param("userId") String userId);

    //结款用户订单
    public List< Map<String, Object>> paymentOrderList(
            @Param("paymentUserId")String paymentUserId,
            @Param("paymentState")String paymentState,
            @Param("startTime")String startTime,
            @Param("endTime")String endTime,
            @Param("buyerName")String buyerName,
            @Param("productName")String productName
    );
    //提成用户列表
    public List< Map<String, Object>> agentUserList(
            @Param("paymentUserId")String paymentUserId,
            @Param("realName")String realName,
            @Param("startTime")String startTime,
            @Param("endTime")String endTime
    );

    //提成用户订单
    public List< Map<String, Object>> agentOrderList(
            @Param("paymentUserId")String paymentUserId,
            @Param("paymentState")String paymentState,
            @Param("startTime")String startTime,
            @Param("endTime")String endTime,
            @Param("buyerName")String buyerName,
            @Param("productName")String productName,
            @Param("paymentStartTime")String paymentStartTime,
            @Param("paymentEndTime")String paymentEndTime
    );

    //结款用户列表
    List< Map<String, Object>> paymentUserList(
            @Param("paymentUserId")String paymentUserId,
            @Param("realName")String realName,
            @Param("startTime")String startTime,
            @Param("endTime")String endTime
    );
}
